3.11.3 \(\int \frac {(A+B x) (d+e x)^2}{(b x+c x^2)^2} \, dx\)

Optimal. Leaf size=108 \[ \frac {d \log (x) (2 A b e-2 A c d+b B d)}{b^3}+\frac {(b B-A c) (c d-b e)^2}{b^2 c^2 (b+c x)}-\frac {A d^2}{b^2 x}-\frac {(c d-b e) \log (b+c x) \left (-2 A c^2 d+b^2 B e+b B c d\right )}{b^3 c^2} \]

________________________________________________________________________________________

Rubi [A]  time = 0.12, antiderivative size = 108, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.042, Rules used = {771} \begin {gather*} \frac {(b B-A c) (c d-b e)^2}{b^2 c^2 (b+c x)}-\frac {(c d-b e) \log (b+c x) \left (-2 A c^2 d+b^2 B e+b B c d\right )}{b^3 c^2}+\frac {d \log (x) (2 A b e-2 A c d+b B d)}{b^3}-\frac {A d^2}{b^2 x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((A + B*x)*(d + e*x)^2)/(b*x + c*x^2)^2,x]

[Out]

-((A*d^2)/(b^2*x)) + ((b*B - A*c)*(c*d - b*e)^2)/(b^2*c^2*(b + c*x)) + (d*(b*B*d - 2*A*c*d + 2*A*b*e)*Log[x])/
b^3 - ((c*d - b*e)*(b*B*c*d - 2*A*c^2*d + b^2*B*e)*Log[b + c*x])/(b^3*c^2)

Rule 771

Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> In
t[ExpandIntegrand[(d + e*x)^m*(f + g*x)*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, m}, x] && N
eQ[b^2 - 4*a*c, 0] && IntegerQ[p] && (GtQ[p, 0] || (EqQ[a, 0] && IntegerQ[m]))

Rubi steps

\begin {align*} \int \frac {(A+B x) (d+e x)^2}{\left (b x+c x^2\right )^2} \, dx &=\int \left (\frac {A d^2}{b^2 x^2}+\frac {d (b B d-2 A c d+2 A b e)}{b^3 x}-\frac {(b B-A c) (-c d+b e)^2}{b^2 c (b+c x)^2}+\frac {(-c d+b e) \left (b B c d-2 A c^2 d+b^2 B e\right )}{b^3 c (b+c x)}\right ) \, dx\\ &=-\frac {A d^2}{b^2 x}+\frac {(b B-A c) (c d-b e)^2}{b^2 c^2 (b+c x)}+\frac {d (b B d-2 A c d+2 A b e) \log (x)}{b^3}-\frac {(c d-b e) \left (b B c d-2 A c^2 d+b^2 B e\right ) \log (b+c x)}{b^3 c^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.11, size = 101, normalized size = 0.94 \begin {gather*} \frac {\frac {(b e-c d) \log (b+c x) \left (-2 A c^2 d+b^2 B e+b B c d\right )}{c^2}+\frac {b (b B-A c) (c d-b e)^2}{c^2 (b+c x)}+d \log (x) (2 A b e-2 A c d+b B d)-\frac {A b d^2}{x}}{b^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((A + B*x)*(d + e*x)^2)/(b*x + c*x^2)^2,x]

[Out]

(-((A*b*d^2)/x) + (b*(b*B - A*c)*(c*d - b*e)^2)/(c^2*(b + c*x)) + d*(b*B*d - 2*A*c*d + 2*A*b*e)*Log[x] + ((-(c
*d) + b*e)*(b*B*c*d - 2*A*c^2*d + b^2*B*e)*Log[b + c*x])/c^2)/b^3

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {(A+B x) (d+e x)^2}{\left (b x+c x^2\right )^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[((A + B*x)*(d + e*x)^2)/(b*x + c*x^2)^2,x]

[Out]

IntegrateAlgebraic[((A + B*x)*(d + e*x)^2)/(b*x + c*x^2)^2, x]

________________________________________________________________________________________

fricas [B]  time = 0.42, size = 258, normalized size = 2.39 \begin {gather*} -\frac {A b^{2} c^{2} d^{2} - {\left ({\left (B b^{2} c^{2} - 2 \, A b c^{3}\right )} d^{2} - 2 \, {\left (B b^{3} c - A b^{2} c^{2}\right )} d e + {\left (B b^{4} - A b^{3} c\right )} e^{2}\right )} x + {\left ({\left (2 \, A b c^{3} d e - B b^{3} c e^{2} + {\left (B b c^{3} - 2 \, A c^{4}\right )} d^{2}\right )} x^{2} + {\left (2 \, A b^{2} c^{2} d e - B b^{4} e^{2} + {\left (B b^{2} c^{2} - 2 \, A b c^{3}\right )} d^{2}\right )} x\right )} \log \left (c x + b\right ) - {\left ({\left (2 \, A b c^{3} d e + {\left (B b c^{3} - 2 \, A c^{4}\right )} d^{2}\right )} x^{2} + {\left (2 \, A b^{2} c^{2} d e + {\left (B b^{2} c^{2} - 2 \, A b c^{3}\right )} d^{2}\right )} x\right )} \log \relax (x)}{b^{3} c^{3} x^{2} + b^{4} c^{2} x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(e*x+d)^2/(c*x^2+b*x)^2,x, algorithm="fricas")

[Out]

-(A*b^2*c^2*d^2 - ((B*b^2*c^2 - 2*A*b*c^3)*d^2 - 2*(B*b^3*c - A*b^2*c^2)*d*e + (B*b^4 - A*b^3*c)*e^2)*x + ((2*
A*b*c^3*d*e - B*b^3*c*e^2 + (B*b*c^3 - 2*A*c^4)*d^2)*x^2 + (2*A*b^2*c^2*d*e - B*b^4*e^2 + (B*b^2*c^2 - 2*A*b*c
^3)*d^2)*x)*log(c*x + b) - ((2*A*b*c^3*d*e + (B*b*c^3 - 2*A*c^4)*d^2)*x^2 + (2*A*b^2*c^2*d*e + (B*b^2*c^2 - 2*
A*b*c^3)*d^2)*x)*log(x))/(b^3*c^3*x^2 + b^4*c^2*x)

________________________________________________________________________________________

giac [A]  time = 0.15, size = 167, normalized size = 1.55 \begin {gather*} \frac {{\left (B b d^{2} - 2 \, A c d^{2} + 2 \, A b d e\right )} \log \left ({\left | x \right |}\right )}{b^{3}} - \frac {{\left (B b c^{2} d^{2} - 2 \, A c^{3} d^{2} + 2 \, A b c^{2} d e - B b^{3} e^{2}\right )} \log \left ({\left | c x + b \right |}\right )}{b^{3} c^{2}} - \frac {A b c^{2} d^{2} - {\left (B b c^{2} d^{2} - 2 \, A c^{3} d^{2} - 2 \, B b^{2} c d e + 2 \, A b c^{2} d e + B b^{3} e^{2} - A b^{2} c e^{2}\right )} x}{{\left (c x + b\right )} b^{2} c^{2} x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(e*x+d)^2/(c*x^2+b*x)^2,x, algorithm="giac")

[Out]

(B*b*d^2 - 2*A*c*d^2 + 2*A*b*d*e)*log(abs(x))/b^3 - (B*b*c^2*d^2 - 2*A*c^3*d^2 + 2*A*b*c^2*d*e - B*b^3*e^2)*lo
g(abs(c*x + b))/(b^3*c^2) - (A*b*c^2*d^2 - (B*b*c^2*d^2 - 2*A*c^3*d^2 - 2*B*b^2*c*d*e + 2*A*b*c^2*d*e + B*b^3*
e^2 - A*b^2*c*e^2)*x)/((c*x + b)*b^2*c^2*x)

________________________________________________________________________________________

maple [A]  time = 0.05, size = 199, normalized size = 1.84 \begin {gather*} \frac {2 A d e}{\left (c x +b \right ) b}-\frac {A c \,d^{2}}{\left (c x +b \right ) b^{2}}+\frac {2 A d e \ln \relax (x )}{b^{2}}-\frac {2 A d e \ln \left (c x +b \right )}{b^{2}}-\frac {2 A c \,d^{2} \ln \relax (x )}{b^{3}}+\frac {2 A c \,d^{2} \ln \left (c x +b \right )}{b^{3}}-\frac {A \,e^{2}}{\left (c x +b \right ) c}+\frac {B b \,e^{2}}{\left (c x +b \right ) c^{2}}+\frac {B \,d^{2}}{\left (c x +b \right ) b}+\frac {B \,d^{2} \ln \relax (x )}{b^{2}}-\frac {B \,d^{2} \ln \left (c x +b \right )}{b^{2}}-\frac {2 B d e}{\left (c x +b \right ) c}+\frac {B \,e^{2} \ln \left (c x +b \right )}{c^{2}}-\frac {A \,d^{2}}{b^{2} x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)*(e*x+d)^2/(c*x^2+b*x)^2,x)

[Out]

-2/b^2*ln(c*x+b)*A*d*e+2/b^3*c*ln(c*x+b)*A*d^2+1/c^2*ln(c*x+b)*B*e^2-1/b^2*ln(c*x+b)*B*d^2-1/c/(c*x+b)*A*e^2+2
/b/(c*x+b)*A*d*e-c/b^2/(c*x+b)*A*d^2+1/c^2*b/(c*x+b)*B*e^2-2/c/(c*x+b)*B*d*e+1/b/(c*x+b)*B*d^2-A*d^2/b^2/x+2*d
/b^2*ln(x)*A*e-2*d^2/b^3*ln(x)*A*c+d^2/b^2*ln(x)*B

________________________________________________________________________________________

maxima [A]  time = 0.47, size = 165, normalized size = 1.53 \begin {gather*} -\frac {A b c^{2} d^{2} - {\left ({\left (B b c^{2} - 2 \, A c^{3}\right )} d^{2} - 2 \, {\left (B b^{2} c - A b c^{2}\right )} d e + {\left (B b^{3} - A b^{2} c\right )} e^{2}\right )} x}{b^{2} c^{3} x^{2} + b^{3} c^{2} x} + \frac {{\left (2 \, A b d e + {\left (B b - 2 \, A c\right )} d^{2}\right )} \log \relax (x)}{b^{3}} - \frac {{\left (2 \, A b c^{2} d e - B b^{3} e^{2} + {\left (B b c^{2} - 2 \, A c^{3}\right )} d^{2}\right )} \log \left (c x + b\right )}{b^{3} c^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(e*x+d)^2/(c*x^2+b*x)^2,x, algorithm="maxima")

[Out]

-(A*b*c^2*d^2 - ((B*b*c^2 - 2*A*c^3)*d^2 - 2*(B*b^2*c - A*b*c^2)*d*e + (B*b^3 - A*b^2*c)*e^2)*x)/(b^2*c^3*x^2
+ b^3*c^2*x) + (2*A*b*d*e + (B*b - 2*A*c)*d^2)*log(x)/b^3 - (2*A*b*c^2*d*e - B*b^3*e^2 + (B*b*c^2 - 2*A*c^3)*d
^2)*log(c*x + b)/(b^3*c^2)

________________________________________________________________________________________

mupad [B]  time = 0.27, size = 154, normalized size = 1.43 \begin {gather*} \frac {\ln \relax (x)\,\left (b\,\left (B\,d^2+2\,A\,e\,d\right )-2\,A\,c\,d^2\right )}{b^3}-\frac {\frac {A\,d^2}{b}+\frac {x\,\left (-B\,b^3\,e^2+2\,B\,b^2\,c\,d\,e+A\,b^2\,c\,e^2-B\,b\,c^2\,d^2-2\,A\,b\,c^2\,d\,e+2\,A\,c^3\,d^2\right )}{b^2\,c^2}}{c\,x^2+b\,x}+\frac {\ln \left (b+c\,x\right )\,\left (b\,e-c\,d\right )\,\left (B\,e\,b^2+B\,d\,b\,c-2\,A\,d\,c^2\right )}{b^3\,c^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((A + B*x)*(d + e*x)^2)/(b*x + c*x^2)^2,x)

[Out]

(log(x)*(b*(B*d^2 + 2*A*d*e) - 2*A*c*d^2))/b^3 - ((A*d^2)/b + (x*(2*A*c^3*d^2 - B*b^3*e^2 + A*b^2*c*e^2 - B*b*
c^2*d^2 - 2*A*b*c^2*d*e + 2*B*b^2*c*d*e))/(b^2*c^2))/(b*x + c*x^2) + (log(b + c*x)*(b*e - c*d)*(B*b^2*e - 2*A*
c^2*d + B*b*c*d))/(b^3*c^2)

________________________________________________________________________________________

sympy [B]  time = 3.86, size = 367, normalized size = 3.40 \begin {gather*} \frac {- A b c^{2} d^{2} + x \left (- A b^{2} c e^{2} + 2 A b c^{2} d e - 2 A c^{3} d^{2} + B b^{3} e^{2} - 2 B b^{2} c d e + B b c^{2} d^{2}\right )}{b^{3} c^{2} x + b^{2} c^{3} x^{2}} + \frac {d \left (2 A b e - 2 A c d + B b d\right ) \log {\left (x + \frac {- 2 A b^{2} c d e + 2 A b c^{2} d^{2} - B b^{2} c d^{2} + b c d \left (2 A b e - 2 A c d + B b d\right )}{- 4 A b c^{2} d e + 4 A c^{3} d^{2} + B b^{3} e^{2} - 2 B b c^{2} d^{2}} \right )}}{b^{3}} + \frac {\left (b e - c d\right ) \left (- 2 A c^{2} d + B b^{2} e + B b c d\right ) \log {\left (x + \frac {- 2 A b^{2} c d e + 2 A b c^{2} d^{2} - B b^{2} c d^{2} + \frac {b \left (b e - c d\right ) \left (- 2 A c^{2} d + B b^{2} e + B b c d\right )}{c}}{- 4 A b c^{2} d e + 4 A c^{3} d^{2} + B b^{3} e^{2} - 2 B b c^{2} d^{2}} \right )}}{b^{3} c^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(e*x+d)**2/(c*x**2+b*x)**2,x)

[Out]

(-A*b*c**2*d**2 + x*(-A*b**2*c*e**2 + 2*A*b*c**2*d*e - 2*A*c**3*d**2 + B*b**3*e**2 - 2*B*b**2*c*d*e + B*b*c**2
*d**2))/(b**3*c**2*x + b**2*c**3*x**2) + d*(2*A*b*e - 2*A*c*d + B*b*d)*log(x + (-2*A*b**2*c*d*e + 2*A*b*c**2*d
**2 - B*b**2*c*d**2 + b*c*d*(2*A*b*e - 2*A*c*d + B*b*d))/(-4*A*b*c**2*d*e + 4*A*c**3*d**2 + B*b**3*e**2 - 2*B*
b*c**2*d**2))/b**3 + (b*e - c*d)*(-2*A*c**2*d + B*b**2*e + B*b*c*d)*log(x + (-2*A*b**2*c*d*e + 2*A*b*c**2*d**2
 - B*b**2*c*d**2 + b*(b*e - c*d)*(-2*A*c**2*d + B*b**2*e + B*b*c*d)/c)/(-4*A*b*c**2*d*e + 4*A*c**3*d**2 + B*b*
*3*e**2 - 2*B*b*c**2*d**2))/(b**3*c**2)

________________________________________________________________________________________